
package com.jf.cloud.common.order.dto;

import com.jf.cloud.common.product.dto.CartComboMatchSpuDTO;
import io.swagger.v3.oas.annotations.media.Schema;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 购物车物品参数
 *
 * @author zz
 * @date 2020-12-04 11:27:35
 */
public class ShopCartItemDTO {

    @NotNull(message = "产品ID不能为空")
    @Schema(description = "产品ID" ,required=true)
    private Long spuId;

    @NotNull(message = "skuId不能为空")
    @Schema(description = "skuId" ,required=true)
    private Long skuId;

    @NotNull(message = "商品数量不能为空")
    @Min(value = 1,message = "商品数量不能为空")
    @Schema(description = "商品数量" ,required=true)
    private Integer count;

    @NotNull(message = "店铺id不能为空")
    @Schema(description = "店铺id" ,required=true)
    private Long shopId;

    @Schema(description = "推广员用户id" )
    private Long distributionUserId;

    @Schema(description = "套餐id" )
    private Long comboId;

    @Schema(description = "套餐数量" )
    private Integer comboCount;

    @Schema(description = "主购物车id（套餐）" )
    private Integer parentCartItemId;

    @Schema(description = "搭配商品Sku id列表" )
    private List<CartComboMatchSpuDTO> cartComboMatchSpuDTOS;

    @Schema(description = "主商品起搭数量" )
    private Integer comboMainLeastNum;

    public Integer getComboMainLeastNum() {
        return comboMainLeastNum;
    }

    public void setComboMainLeastNum(Integer comboMainLeastNum) {
        this.comboMainLeastNum = comboMainLeastNum;
    }

    public List<CartComboMatchSpuDTO> getCartComboMatchSpuDTOS() {
        return cartComboMatchSpuDTOS;
    }

    public void setCartComboMatchSpuDTOS(List<CartComboMatchSpuDTO> matchingSkuIds) {
        this.cartComboMatchSpuDTOS = matchingSkuIds;
    }

    public Long getComboId() {
        return comboId;
    }

    public void setComboId(Long comboId) {
        this.comboId = comboId;
    }

    public Integer getComboCount() {
        return comboCount;
    }

    public void setComboCount(Integer comboCount) {
        this.comboCount = comboCount;
    }

    public Integer getParentCartItemId() {
        return parentCartItemId;
    }

    public void setParentCartItemId(Integer parentCartItemId) {
        this.parentCartItemId = parentCartItemId;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getDistributionUserId() {
        return distributionUserId;
    }

    public void setDistributionUserId(Long distributionUserId) {
        this.distributionUserId = distributionUserId;
    }

    @Override
    public String toString() {
        return "OrderItemDTO{" +
                "spuId=" + spuId +
                ", skuId=" + skuId +
                ", count=" + count +
                ", shopId=" + shopId +
                ", distributionUserId=" + distributionUserId +
                '}';
    }
}
